<?php 
$pageTitle = "Upload";
include_once "common/header.php"; 

	if(!empty($_POST['name'])):
		include_once "common/inc/class.blocks.inc.php";
		$upBlocks = new GenericBlocks($db);
		$upBlocks->createNewBlocks();
		echo "DONE!";
		exit;
	

	else:
?>


	

	<body>
	
	<?php include_once "common/user-menu.php"; ?>
	<link rel="stylesheet" type="text/css" href="css/user/upload-page.css" />
	
	<div class = "upload-container">
	 <form action="upload-blocks.php" method="post" enctype="multipart/form-data">
		<input class="textfield" type="text" placeholder="Name" required="" name = "name">
		<input type="file" id="files" name="files[]" multiple="multiple" accept="image/*" />
		<input type="submit" value="Upload!" />
	</form>
	</div>
		
	</body>
</html>
<?php endif?>